<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
/*
    var n = 123;

    function foo( num ) {
        num *= 2;
        console.log( 'over' );
    }

    foo( n );

    console.log( n );
*/


    var o = { num: 123 };

    function foo ( obj ) {
        obj.num *= 2;
    }

    foo( o );


    console.log( 'o.num = ' + o.num );
</script>
</html>